import java.util.Scanner;
import java.util.Random;

import static java.lang.Math.sqrt;

/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-09
 */
public class exercise {
//    public static void main(String[] args) {
//        int a = 10;
//        int b = 20;
//        a +=  (b-a) >> 1;
//        System.out.println(a);
//        }
//    public static void main(String[] args) {
////        Scanner scanner = new Scanner(System.in);
////        int a = scanner.nextInt();
////        if (a%2 == 0) {
////            System.out.println("偶数");
////        }
////        else {
////            System.out.println("奇数");
////        }
////        Scanner scanner = new Scanner(System.in);
////        int a = scanner.nextInt();
////        switch(a){
////            case 1:
////                System.out.println("one");
////                break;
////            case 2:
////                System.out.println("two");
////                break;
////            case 3:
////                System.out.println("three");
////                break;
////            case 4:
////                System.out.println("four");
////                break;
////            default:
////                System.out.println("no match");
////                break;
////
//        int a = 0;
//        for (int i = 1; i < 101; i++) {
//            a += i;
//        }
//        System.out.println(a);
//
//        a = 0;
//        for (int i = 1; i < 101; i++) {
//            if (i%2 == 0){
//                a += i;
//            }
//        }
//        System.out.println(a);
//
//        a = 0;
//        for (int i = 1; i < 101; i++) {
//            if (i%2 != 0){
//                a += i;
//            }
//        }
//        System.out.println(a);
//    }
//    public static void main(String[] args) {
//        int sum = 0;
//        int sumOdd = 0;
//        int sumEven = 0;
//        for (int i = 1; i < 101; i++) {
//            int flag = (i%2 == 0) ? (sumEven += i) : (sumOdd += i);
//        }
//        System.out.println((sumOdd+sumEven) + " " + sumOdd + " " + sumEven);
////    }
//    public static void main(String[] args) {
//        int a = 0;
//        int sum = 0;
//        for (int i = 0; i < 5; i++) {
//            int sum1 = 1;
//            for (int j = 5-i; j > 0; j--) {
//                sum1 *= j;
//            }
//            sum += sum1;
//            System.out.println("第" + (i+1) + "次的和" + sum);
//        }
//        System.out.println(sum);
//    }
//    public static void main(String[] args) {
//        int i = 0;
//        Scanner scan = new Scanner(System.in);
//        String str2 = scan.nextLine();
//        int a = scan.nextInt();
//        float b = scan.nextFloat();
//        double c = scan.nextDouble();
//        String str1 = scan.next();
//        System.out.println(a);
//        System.out.println(b);
//        System.out.println(c);
//        System.out.println(str1);
//        System.out.print(str2);
//    }
//    public static void main(String[] args) {
//        Scanner scan = new Scanner(System.in);
//        int i = 5;
//        while (i!=0){
//            String a = scan.nextLine();
//            System.out.print(a);
//            i--;
//        }
//    }
//    public static void main(String[] args){
//        Random rand = new Random();
//        Scanner scan = new Scanner(System.in);
//        int right = rand.nextInt(100) + 1;
//        int guess = 0;
//        int oport = 10;
//        do {
//            System.out.println("请输入一个数");
//            guess = scan.nextInt();
//            if (guess > right){
//                System.out.println("猜大了");
//            }else if (guess < right) {
//                System.out.println("猜小了");
//            }else {
//                System.out.println("恭喜你，猜对了!");
//                break;
//            }
//            oport--;
//        }while (oport != 0);
//        if (oport == 0){
//            System.out.println("次数用尽，你输了。正确答案是：" + right);
//        }
//    }
    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        int age = scan.nextInt();
        if (age < 19){
            System.out.println("少年");
        }else if (age>=19 && age<29){
            System.out.println("青年");
        }else if (age>=29 && age<56){
            System.out.println("中年");
        }else{
            System.out.println("老年");
        }
    }

    public static void main2(String[] args) {
//        Scanner scan = new Scanner(System.in);
//        int a = scan.nextInt();

        for (int a = 2; a < 101; a++){
            boolean flag = true;
            for (int i = 2; i <= sqrt(a); i++) {
                if (a % i == 0){
                    //System.out.println("不是素数 " + i);
                    flag = false;
                    break;
                }
            }
            if (flag || a==2){
                System.out.println(a + " ");
            }
        }
    }

    public static void main3(String[] args) {
        for (int i = 1000; i < 2000; i++) {

            if (((i%100 != 0) && (i%4 == 0)) || (i%400 == 0)){
                System.out.println(i + " ");
            }
        }
    }

    public static void main4(String[] args) {
        for (int i = 1; i < 10; i++) {
            for (int j = 1; j < i+1; j++) {
                System.out.printf("%2dx%d=%2d", j, i, i*j);
            }
            System.out.println("");
        }
    }

    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = a % b;
        while (c != 0){
            a = b;
            b = c;
            c = a % b;
        }
        System.out.println(b);
    }

    public static void main6(String[] args) {
        for (int i = 1; i < 1001; i++) {
            int tmp = i;
            int sum = 0;
            while (tmp != 0){
                sum += (tmp%10) * (tmp%10) * (tmp%10);
                tmp /= 10;
            }
            if (sum == i){
                System.out.println(i);
            }
        }
    }

    public static void main7(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int count = 0;
        while (a != 0){
            count++;
            a &= (a-1);
        }
        System.out.println(count);
    }

    public static void main8(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        for (int i = 0; i < a; i++) {
            for (int j = 0; j < a; j++) {
                if (j==i || (a-j-1)==i){
                    System.out.print("*");
                }else{
                    System.out.print(" ");
                }
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        int count = 3;
        Scanner scan = new Scanner(System.in);
        while (count != 0){
            count--;
            System.out.println("请输入你的密码：");
            String a = scan.nextLine();
            if (a.equals("tangjun")){
                System.out.println("登录成功！");
            }else{
                System.out.println("登陆失败！你还有" + count + "次机会");
            }
        }
    }
}
